
import { Drawer } from "antd";
import { Props } from "./model";
import Service from "./Service";
import style from "./style.module.css";
import { MyDrawer, MySegmented } from "./styled";
export default class Classify extends Service{
    render = () => {
        let {isVisible}=this.state;
        return (
            <div className={style.Classify}>
                <div className={style.left}>
                    <MySegmented onChange={(value:string)=>{
                        this.props.setActiveId(Number(value))
                        
                    }} defaultValue={1} options={[{label:"热门推荐",value:1}, {label:"即将过期",value:2}, {label:"最新发布",value:3}]} /> 
                </div>
                <div onClick={()=>this.setState({
                    isVisible:true
                })} className={style.right}>
                    <div className={style.text}>
                        筛选
                    </div>
                    <div className={style.icon}>
                        <img src={require("../../../../assect/image/select_more.png")} alt="" />
                    </div>
                </div>
                <MyDrawer  title="请选择分类" placement="right" footer={
                    <div className={style.drawer_footer}>
                        <a className={style.reset}>
                            重置
                        </a>
                        <a className={style.confirm}>
                            确定
                        </a>
                    </div>
                } onClose={()=>this.setState({
                    isVisible:false
                })}  visible={isVisible}>
                    <p>Some contents...</p>
                    <p>Some contents...</p>
                    <p>Some contents...</p>
                </MyDrawer>
            </div>
        )
    }
}